---
title: Client Integrations
---

## Claude Desktop Integration

To use with Claude Desktop, add an entry to your Claude Desktop configuration (`claude_desktop_config.json`, typically found in `~/.config/claude-desktop/`):

### Package Installation Method

```json
{
  "mcpServers": {
    "cua-agent": {
      "command": "/bin/bash",
      "args": ["~/.cua/start_mcp_server.sh"],
      "env": {
        "CUA_MODEL_NAME": "anthropic/claude-sonnet-4-20250514",
        "ANTHROPIC_API_KEY": "your-anthropic-api-key-here",
        "CUA_MAX_IMAGES": "3",
        "CUA_USE_HOST_COMPUTER_SERVER": "false"
      }
    }
  }
}
```

### Development Method

If you're working with the CUA source code:

**Standard VM Mode:**

```json
{
  "mcpServers": {
    "cua-agent": {
      "command": "/usr/bin/env",
      "args": [
        "bash",
        "-lc",
        "export CUA_MODEL_NAME='anthropic/claude-sonnet-4-20250514'; export ANTHROPIC_API_KEY='your-anthropic-api-key-here'; /path/to/cua/libs/python/mcp-server/scripts/start_mcp_server.sh"
      ]
    }
  }
}
```

**Host Computer Control Mode:**

```json
{
  "mcpServers": {
    "cua-agent": {
      "command": "/usr/bin/env",
      "args": [
        "bash",
        "-lc",
        "export CUA_MODEL_NAME='anthropic/claude-sonnet-4-20250514'; export ANTHROPIC_API_KEY='your-anthropic-api-key-here'; export CUA_USE_HOST_COMPUTER_SERVER='true'; export CUA_MAX_IMAGES='1'; /path/to/cua/libs/python/mcp-server/scripts/start_mcp_server.sh"
      ]
    }
  }
}
```

**Note**: Replace `/path/to/cua` with the absolute path to your CUA repository directory.

**⚠️ Host Computer Control Setup**: When using `CUA_USE_HOST_COMPUTER_SERVER='true'`, you must also:

1. Install computer server dependencies: `python3 -m pip install uvicorn fastapi`
2. Install the computer server: `python3 -m pip install -e libs/python/computer-server --break-system-packages`
3. Start the computer server: `python -m computer_server --log-level debug`
4. The AI will have direct access to your desktop - use with caution!

For more information on MCP with Claude Desktop, see the [official MCP User Guide](https://modelcontextprotocol.io/quickstart/user).

## Cursor Integration

To use with Cursor, add an MCP configuration file in one of these locations:

- **Project-specific**: Create `.cursor/mcp.json` in your project directory
- **Global**: Create `~/.cursor/mcp.json` in your home directory

Example configuration for Cursor:

```json
{
  "mcpServers": {
    "cua-agent": {
      "command": "/bin/bash",
      "args": ["~/.cua/start_mcp_server.sh"],
      "env": {
        "CUA_MODEL_NAME": "anthropic/claude-sonnet-4-20250514",
        "ANTHROPIC_API_KEY": "your-anthropic-api-key-here"
      }
    }
  }
}
```

After configuration, you can simply tell Cursor's Agent to perform computer tasks by explicitly mentioning the CUA agent, such as "Use the computer control tools to open Safari."

For more information on MCP with Cursor, see the [official Cursor MCP documentation](https://docs.cursor.com/context/model-context-protocol).

## Other MCP Clients

The MCP server is compatible with any MCP-compliant client. The server exposes the following tools:

- `run_cua_task` - Execute single computer tasks
- `run_multi_cua_tasks` - Execute multiple tasks (sequential or concurrent)
- `screenshot_cua` - Capture screenshots
- `get_session_stats` - Monitor session statistics
- `cleanup_session` - Manage session lifecycle

### Configuration Options

All MCP clients can configure the server using environment variables:

- `CUA_MODEL_NAME` - Model to use for task execution
- `CUA_MAX_IMAGES` - Maximum images to keep in context
- `CUA_USE_HOST_COMPUTER_SERVER` - Use host system instead of VM

See the [Configuration](/docs/libraries/mcp-server/configuration) page for detailed configuration options.
